package com.woniu03;

import java.io.File;

public class Test01 {
    //求和递归
    public static void main(String[] args) {
        System.out.println(test(3));
    }

    private static int test(int n){
       if(n==1){
           return 1;
       }else{
           return n+test(n-1);
       }
    }
}
